﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
using System.Web.UI.WebControls;

/// <summary>
/// Compares ListItems by name
/// </summary>
public class ListComparer : IComparer<ListItem> {
    public int Compare(ListItem x, ListItem y) {
        if(x == null || y == null) {
            return 0;
        } else {
            return new CaseInsensitiveComparer().Compare(x.Text, y.Text);
        }
    }
}
